﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _9.Exercise
{
    class Program
    {
        static void Main(string[] args)
        {
            string text = "Microsoft announced its next generation PHP compiler today. It is based on .NET Framework 4.0 and is implemented as a dynamic language in CLR.";
            string words = "  PHP  ,  Microsoft  ,  CLR";            
            string[] forbidenWords = words.Split(',');
            for (int i = 0; i < forbidenWords.Length; i++)
            {
                forbidenWords[i] = forbidenWords[i].Trim();
                text = text.Replace(forbidenWords[i], new string('*', forbidenWords[i].Length));
            }            
            Console.WriteLine(text);
        }
    }
}
